The present invention is directed to a computer memory allocation system allowing efficient use of random access memory (RAM), particularly in microcomputers such as the IBM-PC, XT, AT and PS/2 systems, as well as other personal computers compatible to such PC computers. Specifically, the present invention permits the utilization of a plurality of "terminate and stay resident" (TSR) programs, or other programs, in conjunction with a primary or "application" program, while staying within the computer's normal RAM storage limits, typically 640 kilobytes (640K).
Since their initial appearance, TSRs have become a popular form of software for disc-operating system (DOS) microcomputers. TSRs provide instant access to a great number of functions and deliver a taste of multi-tasking on systems and environments that do not need the full power of a sophisticated operating system. The main drawback of the TSR approach is that the TSRs stay resident or stored in RAM at all times, thus occupying space that may be needed by another program. As application programs such as spreadsheet generators, word processing programs and the like grow more complex, they generally require more RAM space for themselves, thus limiting the space available for TSRs. Conversely, having the TSRs in RAM limits the size of the application program which can be loaded.
The general feature of a TSR program is that, once loaded into the computer's RAM memory, it can be activated at any time. This feature normally permits the operation of an application program to be temporarily suspended to gain access to a TSR. TSR programs are available to check spelling to take notes, to provide instant calculations, to send telecopies, to store databases, and to automate everything from printing labels to dialing a telephone. Thus, as may be appreciated, they provide enormous flexibility to a computer system when they can be utilized with other programs. The shortcoming of such a system, however, is that, as TSR programs are designed to remain in RAM, the space allocated to the TSR is no longer available to other programs. Some TSRs use 200K or more of memory, causing a substantial depletion in available memory. This sometimes prohibits the running of a large-scale application program.
Accordingly, personal computer users have had to choose which TSRs they can live without and, in some cases, have had to remove all TSRs entirely or to juggle them, loading only the TSRs that were deemed to be absolutely essential, depending on the appliction program with which they were to be installed. Such juggling substantially limits the value of a TSR.
In addition, in a network environment delays often experienced between a data transfer request and data receipt, which is often handled by a TSR communications program, can require the maintenance of the TSR in an "active" mode during the duration of the call. If the TSR is disabled, such as in the case where it is desired to reinstitute operation of an application program, the computer system will be unable to handle the received data, causing loss of the data or a system malfunction. It is thus necessary to keep the TSR active during the entirety of the call to prevent such loss, resulting in unnecessary, unproductive use of the system.
The present invention allows TSRs to be removed from RAM, placing them on disk or in expanded or extended memory space not normally able to be used by an active program. This frees all the internal RAM memory previously occupied by the TSRs, making it available for use by other programs. When it is desired a TSR, the invention brings it into RAM, suspending operation of the program currently running in such a manner that full continuity of processing is presented. The invention allocates the necessary RAM space for the TSR, removing and storing the previous contents of the space. After the TSR completes its operation, it is removed from RAM, and the removed contents are returned. The interrupted program is then fully restored.
In another and further aspect of the invention, the invention duplicates the data-handling attributes of a communication TSR in a network environment, thus allowing the TSR to be removed from memory without disrupting a communication link established by it. When data is received the invention emulates the TSR, allowing full receipt of the data and notifiction to the user and/or other software of its arrival.
For a more complete understanding of the present invention and a better appreciation of its attendant advantages, reference should be made to the following detailed description of a preferred embodiment thereof, taken in conjunction with the accompanying drawings.